3.74 \(\int \frac{(c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^{3/2}} \, dx\)

Optimal. Leaf size=119 \[ \frac{2 c^2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{a^{3/2} f}-\frac{\sqrt{2} c^2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{a^{3/2} f}-\frac{2 c^2 \tan (e+f x)}{f (a \sec (e+f x)+a)^{3/2}} \]

[Out]

(2*c^2*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(a^(3/2)*f) - (Sqrt[2]*c^2*ArcTan[(Sqrt[a]*Tan
[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(a^(3/2)*f) - (2*c^2*Tan[e + f*x])/(f*(a + a*Sec[e + f*x])^(3/
2))

________________________________________________________________________________________

Rubi [A]  time = 0.191734, antiderivative size = 134, normalized size of antiderivative = 1.13, number of steps used = 7, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3904, 3887, 470, 12, 391, 203} \[ \frac{2 c^2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{a^{3/2} f}-\frac{\sqrt{2} c^2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{a^{3/2} f}-\frac{c^2 \sin (e+f x) \sec ^2\left (\frac{1}{2} (e+f x)\right )}{a f \sqrt{a \sec (e+f x)+a}} \]

Antiderivative was successfully verified.

[In]

Int[(c - c*Sec[e + f*x])^2/(a + a*Sec[e + f*x])^(3/2),x]

[Out]

(2*c^2*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(a^(3/2)*f) - (Sqrt[2]*c^2*ArcTan[(Sqrt[a]*Tan
[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(a^(3/2)*f) - (c^2*Sec[(e + f*x)/2]^2*Sin[e + f*x])/(a*f*Sqrt[
a + a*Sec[e + f*x]])

Rule 3904

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[(-(a*c))^m, Int[Cot[e + f*x]^(2*m)*(c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x]
&& EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !(IntegerQ[n] && GtQ[m - n, 0])

Rule 3887

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[(-2*a^(m/2 +
 n + 1/2))/d, Subst[Int[(x^m*(2 + a*x^2)^(m/2 + n - 1/2))/(1 + a*x^2), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(a*e^(2
*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c - a*d)*(p + 1)), x] + Dist[e^(2
*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1) +
(a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 391

Int[1/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x^n),
 x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^{3/2}} \, dx &=\left (a^2 c^2\right ) \int \frac{\tan ^4(e+f x)}{(a+a \sec (e+f x))^{7/2}} \, dx\\ &=-\frac{\left (2 a c^2\right ) \operatorname{Subst}\left (\int \frac{x^4}{\left (1+a x^2\right ) \left (2+a x^2\right )^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac{c^2 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{a f \sqrt{a+a \sec (e+f x)}}-\frac{c^2 \operatorname{Subst}\left (\int \frac{2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a f}\\ &=-\frac{c^2 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{a f \sqrt{a+a \sec (e+f x)}}-\frac{\left (2 c^2\right ) \operatorname{Subst}\left (\int \frac{1}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a f}\\ &=-\frac{c^2 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{a f \sqrt{a+a \sec (e+f x)}}-\frac{\left (2 c^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a f}+\frac{\left (2 c^2\right ) \operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a f}\\ &=\frac{2 c^2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a^{3/2} f}-\frac{\sqrt{2} c^2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)}}\right )}{a^{3/2} f}-\frac{c^2 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{a f \sqrt{a+a \sec (e+f x)}}\\ \end{align*}

Mathematica [A]  time = 1.06782, size = 128, normalized size = 1.08 \[ \frac{c^2 \cot \left (\frac{1}{2} (e+f x)\right ) \left (\sec ^2\left (\frac{1}{2} (e+f x)\right ) \left (\cos (e+f x)+(\cos (e+f x)+1) \sqrt{\sec (e+f x)-1} \tan ^{-1}\left (\sqrt{\sec (e+f x)-1}\right )-1\right )-\sqrt{2} \sqrt{\sec (e+f x)-1} \tan ^{-1}\left (\frac{\sqrt{\sec (e+f x)-1}}{\sqrt{2}}\right )\right )}{a f \sqrt{a (\sec (e+f x)+1)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(c - c*Sec[e + f*x])^2/(a + a*Sec[e + f*x])^(3/2),x]

[Out]

(c^2*Cot[(e + f*x)/2]*(Sec[(e + f*x)/2]^2*(-1 + Cos[e + f*x] + ArcTan[Sqrt[-1 + Sec[e + f*x]]]*(1 + Cos[e + f*
x])*Sqrt[-1 + Sec[e + f*x]]) - Sqrt[2]*ArcTan[Sqrt[-1 + Sec[e + f*x]]/Sqrt[2]]*Sqrt[-1 + Sec[e + f*x]]))/(a*f*
Sqrt[a*(1 + Sec[e + f*x])])

________________________________________________________________________________________

Maple [B]  time = 0.189, size = 369, normalized size = 3.1 \begin{align*} -{\frac{{c}^{2}}{f{a}^{2} \left ( 1+\cos \left ( fx+e \right ) \right ) \sin \left ( fx+e \right ) }\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ( \sqrt{2}\cos \left ( fx+e \right ) \sin \left ( fx+e \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}{\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( fx+e \right ) }{2\,\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) +\sqrt{2}\sin \left ( fx+e \right ){\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( fx+e \right ) }{2\,\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}+\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\ln \left ({\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\cos \left ( fx+e \right ) +1 \right ) } \right ) +\sin \left ( fx+e \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\ln \left ({\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\cos \left ( fx+e \right ) +1 \right ) } \right ) -2\, \left ( \cos \left ( fx+e \right ) \right ) ^{2}+2\,\cos \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c-c*sec(f*x+e))^2/(a+a*sec(f*x+e))^(3/2),x)

[Out]

-c^2/f/a^2*(1/cos(f*x+e)*a*(1+cos(f*x+e)))^(1/2)*(2^(1/2)*cos(f*x+e)*sin(f*x+e)*(-2*cos(f*x+e)/(1+cos(f*x+e)))
^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))+2^(1/2)*sin(f*x+e)*arct
anh(1/2*2^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/
2)+sin(f*x+e)*cos(f*x+e)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*ln(((-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x
+e)-cos(f*x+e)+1)/sin(f*x+e))+sin(f*x+e)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*ln(((-2*cos(f*x+e)/(1+cos(f*x+e)
))^(1/2)*sin(f*x+e)-cos(f*x+e)+1)/sin(f*x+e))-2*cos(f*x+e)^2+2*cos(f*x+e))/(1+cos(f*x+e))/sin(f*x+e)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (c \sec \left (f x + e\right ) - c\right )}^{2}}{{\left (a \sec \left (f x + e\right ) + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^2/(a+a*sec(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

integrate((c*sec(f*x + e) - c)^2/(a*sec(f*x + e) + a)^(3/2), x)

________________________________________________________________________________________

Fricas [B]  time = 3.8022, size = 1389, normalized size = 11.67 \begin{align*} \left [-\frac{4 \, c^{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - \sqrt{2}{\left (a c^{2} \cos \left (f x + e\right )^{2} + 2 \, a c^{2} \cos \left (f x + e\right ) + a c^{2}\right )} \sqrt{-\frac{1}{a}} \log \left (\frac{2 \, \sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{-\frac{1}{a}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, \cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 2 \,{\left (c^{2} \cos \left (f x + e\right )^{2} + 2 \, c^{2} \cos \left (f x + e\right ) + c^{2}\right )} \sqrt{-a} \log \left (\frac{2 \, a \cos \left (f x + e\right )^{2} + 2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{2 \,{\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}}, -\frac{2 \, c^{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 2 \,{\left (c^{2} \cos \left (f x + e\right )^{2} + 2 \, c^{2} \cos \left (f x + e\right ) + c^{2}\right )} \sqrt{a} \arctan \left (\frac{\sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) - \frac{\sqrt{2}{\left (a c^{2} \cos \left (f x + e\right )^{2} + 2 \, a c^{2} \cos \left (f x + e\right ) + a c^{2}\right )} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right )}{\sqrt{a}}}{a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^2/(a+a*sec(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

[-1/2*(4*c^2*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) - sqrt(2)*(a*c^2*cos(f*x + e)^2
 + 2*a*c^2*cos(f*x + e) + a*c^2)*sqrt(-1/a)*log((2*sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt(-1/a)*
cos(f*x + e)*sin(f*x + e) + 3*cos(f*x + e)^2 + 2*cos(f*x + e) - 1)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1)) + 2*
(c^2*cos(f*x + e)^2 + 2*c^2*cos(f*x + e) + c^2)*sqrt(-a)*log((2*a*cos(f*x + e)^2 + 2*sqrt(-a)*sqrt((a*cos(f*x
+ e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)))/(a^2*f*cos(f*x +
e)^2 + 2*a^2*f*cos(f*x + e) + a^2*f), -(2*c^2*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e
) + 2*(c^2*cos(f*x + e)^2 + 2*c^2*cos(f*x + e) + c^2)*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*c
os(f*x + e)/(sqrt(a)*sin(f*x + e))) - sqrt(2)*(a*c^2*cos(f*x + e)^2 + 2*a*c^2*cos(f*x + e) + a*c^2)*arctan(sqr
t(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e)))/sqrt(a))/(a^2*f*cos(f*x + e)
^2 + 2*a^2*f*cos(f*x + e) + a^2*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} c^{2} \left (\int - \frac{2 \sec{\left (e + f x \right )}}{a \sqrt{a \sec{\left (e + f x \right )} + a} \sec{\left (e + f x \right )} + a \sqrt{a \sec{\left (e + f x \right )} + a}}\, dx + \int \frac{\sec ^{2}{\left (e + f x \right )}}{a \sqrt{a \sec{\left (e + f x \right )} + a} \sec{\left (e + f x \right )} + a \sqrt{a \sec{\left (e + f x \right )} + a}}\, dx + \int \frac{1}{a \sqrt{a \sec{\left (e + f x \right )} + a} \sec{\left (e + f x \right )} + a \sqrt{a \sec{\left (e + f x \right )} + a}}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))**2/(a+a*sec(f*x+e))**(3/2),x)

[Out]

c**2*(Integral(-2*sec(e + f*x)/(a*sqrt(a*sec(e + f*x) + a)*sec(e + f*x) + a*sqrt(a*sec(e + f*x) + a)), x) + In
tegral(sec(e + f*x)**2/(a*sqrt(a*sec(e + f*x) + a)*sec(e + f*x) + a*sqrt(a*sec(e + f*x) + a)), x) + Integral(1
/(a*sqrt(a*sec(e + f*x) + a)*sec(e + f*x) + a*sqrt(a*sec(e + f*x) + a)), x))

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^2/(a+a*sec(f*x+e))^(3/2),x, algorithm="giac")

[Out]

Timed out